<template>
   <div v-if="dataList.length>0" :class="{'radion-inline':inline}">
	   <div class="gz-checkbox-box" v-for="(item,index) in dataList" :key="index">
	       <label class="gz-checkbox-title">
			   <input :value="item.value" type="radio" class="gz-checkbox"
			   :name="name" :disabled="item.disabled" @change="change"/>
		      <span>
				  {{item.label}}
			  </span>
		   </label>
	   </div>
   </div>
</template>

<script>
  export default {
    props: {
    radioCheck: [String],
		dataList:{
			type: Array,
			default: [],
							// label: '默认',    单选框名称
							// value:'0',          value值
							// name: 'radioName',   单选框name
							//ischecked: false       是否选中
							// disabled: false         是否禁用
      },
	  inline: {                  //是否显示行内样式
		  type: Boolean,
		  default: false
	  },
	  name: {                  //单选框name值
	  		  type: String,
	  		  default: 'radioName'
	  },
	},
    data() {
      return {
      }
    },
    methods: {
      change(e) {
        this.$emit('input',e.target._value)
      }
    }
  }
</script>

<style>
</style>
